#!/usr/bin/expect

set timeout 5

spawn ssh Username@xx.xx.xx.xx

#expect "#"
send "cd /data/wwwroot/test \r"

#expect "#"
send "git pull \r"

expect -re "Username"
send "xx@xx.com\r"

expect -re "Password"
send "xxxx\r"

#expect "#"
send "exit;\r"
expect eof
exit
